import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import store from './store'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import './styles/global.scss'

// 创建应用实例
const app = createApp(App)

// 挂载Vuex
app.use(store)

// 挂载路由
app.use(router)

// 挂载ElementPlus
app.use(ElementPlus, { size: 'default' })

// 全局错误处理
app.config.errorHandler = (err, vm, info) => {
  console.error('应用错误: ', err, info)
}

// 挂载应用
app.mount('#app')
